package com.ruoyi.ai.service;

import com.ruoyi.ai.api.bo.WxMaAddBo;
import com.ruoyi.ai.api.bo.WxMaConsumeBo;
import com.ruoyi.ai.domain.WxNumChange;
import com.ruoyi.ai.domain.bo.WxBackChangeNumBo;
import com.ruoyi.ai.domain.bo.WxUserBo;
import com.ruoyi.ai.domain.vo.WxNumChangeVo;
import com.ruoyi.ai.domain.bo.WxNumChangeBo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;

import java.util.Collection;
import java.util.List;

/**
 * 次数变更流水Service接口
 *
 * @author yh
 * @date 2024-04-11
 */
public interface IWxNumChangeService {

    /**
     * 查询次数变更流水
     */
    WxNumChangeVo queryById(Long changeId);

    /**
     * 查询次数变更流水列表
     */
    TableDataInfo<WxNumChangeVo> queryPageList(WxNumChangeBo bo, PageQuery pageQuery);

    /**
     * 查询次数变更流水列表
     */
    List<WxNumChangeVo> queryList(WxNumChangeBo bo);

    /**
     * 新增次数变更流水
     */
    Boolean insertByBo(WxNumChangeBo bo);

    /**
     * 修改次数变更流水
     */
    Boolean updateByBo(WxNumChangeBo bo);

    /**
     * 校验并批量删除次数变更流水信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    Boolean consume(WxMaConsumeBo wxMaConsumeBo);

    /**
     * 注册赠送次数
     * @param wxUserBo
     * @return
     */
    Boolean registerGiveNum(WxUserBo wxUserBo);

    /**
     * 开通会员保存次数
     * @param wxUserBo
     * @return
     */
    Boolean openVipSaveNum(WxUserBo wxUserBo,Integer chatNum,Integer ocrNum,Integer voiceNum,Long orderId);

    /**
     * 后台变更次数
     * @param wxBackChangeNumBo
     * @return
     */
    Boolean changeNumFromBack(WxBackChangeNumBo wxBackChangeNumBo);

    /**
     * 新增数量
     * @param wxMaAddBo
     * @return
     */
    Boolean addNum(WxMaAddBo wxMaAddBo);
}
